<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" 
	pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'add_user_do.jsp' starting page</title>

<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

</head>

<body>
	<%
		request.setCharacterEncoding("utf-8");
	%>
	<jsp:useBean id="data" class="start.fly.test.database.databaseTool"
		scope="page" />
	
	<%
		//String ProductID = productInfo.getProductID();
		//String Version = productInfo.getVersion();
		//String PType = productInfo.getPType();
		//String Content = productInfo.getContent();
		//String URL_1 = productInfo.getURL_1();
		String ProductID = request.getParameter("ProductID");
		String Version = request.getParameter("Version");
		String PType = request.getParameter("PType");
		String Content = request.getParameter("Content");
		String URL_1 = request.getParameter("URL_1");
		
		//System.out.println("Message:"+ProductID+","+Version+","+PType+","+Content+","+URL_1);
		
		//获取当前时间
		java.util.Date utilDate = new Date();
		java.sql.Date addTime = new java.sql.Date(utilDate.getTime());

		boolean isInsert = data.insertToGoodInfo(ProductID, Version,
				PType, Content, URL_1, addTime);
		
		if (isInsert) {
			out.print("<script>alert('增加商品成功');document.location='productManage.jsp'</script>");
		} else {
			out.print("<script>alert('增加商品失败');document.location='productManage.jsp'</script>");
		}
	%>
</body>
</html>
